package com.webcamtracker.utils;


public class MathFunctions {

    public static double euclideanDistance(double points1[], double points2[]) {
        assert points1.length == points2.length : "length must be equals";
        double result = 0;

        for (int i = 0; i < points1.length; i++) {
            double v1 = points1[i];
            double v2 = points2[i];
            result += Math.pow((v1 - v2), 2);
        }


        return Math.sqrt(result);
    }
}
